Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Over the past year, I've developed a system which lets visitors to my site view up to 10 images before requiring them to register with my UBBThreads. The result has been that I get over 100 signups a day and bandwidth is a little more under control.

Well, that is if you consider this "under control":

[]http://www.extremebikini.com/fun/traffic.png[/]

Anyway, I've gotten some emails from people wanting to know how I did this. Basically, I run all my images through a single php file. In the php file, I check for any of the UBBThreads cookies. If it is set, then I continue no problem. If not, then I set a cookie to the number of views performed and increment it for each viewing. When it hits 10, I send them to a page that explains the need to signup and refuse to show any more images until they have that UBBThreads cookie in place.

I know, not the most secure; but it works.

Also, for places like my videos; I dont let anyone see anything unless they have a cookie.

I've also modified my pages to insert WHOSE ONLINE information into the Online database. This lets me show how many people are active across my whole site (not just the BBs): http://www.extremebikini.com/ebti/forums/online.php?Cat=

I can then show stats on my front page at: http://www.extremebikini.com (see below under USERS ONLINE)

Hope this helps anyone looking to do something similiar.

Sponsored Links
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Actually, I'm wondering if this could be applied to the my board in the form of just plain page views. Allowing a guest the ability to view up to 10 threads afterwhich they are required to register on the board. I get greatly annoyed when I constantly have anywhere from 5 to 10 anonymous viewers looking at my board at any point in time.

Would something like this be possible in that type of scenario and how might I go about implementing it?

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I'm sure you could. All you would have to do is put in a cookie checker in the viewposts files. If no cookie, increment a counter cookie. When it reaches 10, send them to the login/signup screen.

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Any suggestions for how I might do that? I'm a neophyte at this stuff. I can modify existing code to my heart's content, but developing code from scratch is not my forte'.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Hey Wraith, that's an easy one. I'll nock it off tonight after I have my new box set up and running. I'm sure I'll have it posted before midnight.

Sponsored Links
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Excellent. Once I've seen you you've done I'll better understand how it works and I can "tweak" it to suit my needs. I just don't know all of the PHP commands and their syntax and I'm too darn lazy to go and look them up.

What? I'm a Project Manger, not a developer.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Nice to see JustDave step up to the plate; I'm swampped trying to get PhotoPost PHP done!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
My new box had some bumps. One of the cpu's didn't want to post... blah... lol

I'm waiting on a replacement cpu to get here. I spose I could start everything with a single cpu but I really would like to see from the start the difference.

I'll get to this hack soon.

I'm copying files and getting ready to wipe my old computer clean. Will be around more shortly.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I added code for the PHP version which lets you set a flag to only allow registered users to view images. They can still see thumbnails, but not the actual images without being logged in.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273

Sponsored Links
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Writes extremebikini:
I added code for the PHP version which lets you set a flag to only allow registered users to view images. They can still see thumbnails, but not the actual images without being logged in.

Sweet, is there a way to only allow a certain "group" to see images?

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Well, my system only uses cookies to check for a valid registration - very simple and quick. If you wanted to go further, you would have to write queries into the header of each page where you wanted checks; which goes beyond what I wanted to do with this.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,153
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 464
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 13
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)